<template>
  <div class="shadow-project">
    <p class="title">主要系列</p>
    <div class="tabs" :class="active? 'tp': 'sp'">
      <span @click="active = true">图片</span>
      <span @click="active = false">视频</span>
    </div>
    <div class="tp-content" v-if="active">
      <div class="tp-box">
        <img src="@/assets/shadowProject/img1.png" alt="#">
        <p>CHAMBRAY</p>
      </div>
      <div class="tp-box">
        <img src="@/assets/shadowProject/img2.png" alt="#">
        <p>LUCIDO-TC PACKABLE</p>
      </div>
      <div class="tp-box">
        <img src="@/assets/shadowProject/img3.png" alt="#">
        <p>STONEISLAND MARINA</p>
      </div>
      <div class="tp-box">
        <img src="@/assets/shadowProject/img4.png" alt="#">
        <p>GHOST PIECES</p>
      </div>
      <div class="tp-box">
        <img src="@/assets/shadowProject/img5.png" alt="#">
        <p>NYLON RASO-TC</p>
      </div>
      <div class="tp-box">
        <img src="@/assets/shadowProject/img6.png" alt="#">
        <p>REFLECTIVE GRID ON LAMY-TC</p>
      </div>
    </div>
    <div class="sp-content" v-else>
      <div class="sp-box">
        <img src="@/assets/shadowProject/video1.png" alt="#">
        <p>CHAMBRAY</p>
      </div>
      <div class="sp-box">
        <img src="@/assets/shadowProject/video2.png" alt="#">
        <p>LUCIDO-TC PACKABLE</p>
      </div>
      <div class="sp-box" @click="$router.push('/videoDetail')">
        <img src="@/assets/shadowProject/video3.png" alt="#">
        <p>STONEISLAND MARINA</p>
      </div>
      <div class="sp-box">
        <img src="@/assets/shadowProject/video4.png" alt="#">
        <p>GHOST PIECES</p>
      </div>
      <div class="sp-box">
        <img src="@/assets/shadowProject/video5.png" alt="#">
        <p>REFLECTIVE GRID ON LAMY-TC</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: true
    }
  }
}
</script>

<style lang="scss" scoped>
.shadow-project {
  .title {
    width: 60%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #666;
    border: 3px solid #666;
    margin: 20px 20%;
  }
  .tabs {
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    display: flex;
    justify-content: center;
  }
  .tp {
    span {
      display: inline-block;
      transition: ease-in-out .3s;
      &:nth-child(1) {
        width: 80px;
        text-align: center;
        border-top: 4px solid #666;
        border-right: 4px solid #666;
      }
      &:nth-child(2) {
        flex: 1;
        text-indent: 30px;
        border-bottom: 4px solid #666;
      }
    }
  }
  .sp{
    span {
      display: inline-block;
      transition: ease-in-out .3s;
      &:nth-child(1) {
        width: 80px;
        text-align: center;
        border-bottom: 4px solid #666;
        border-right: 4px solid #666;
      }
      &:nth-child(2) {
        flex: 1;
        text-indent: 30px;
        border-top: 4px solid #666;
      }
    }
  }
  .tp-content {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    .tp-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 50%;
      padding: 25px 0;
      box-sizing: border-box;
      img {
        width: 80%;
      }
      p {
        min-width: 60%;
        line-height: 36px;
        font-size: 12px;
        border-bottom: 1px solid #666;
        text-align: center;
      }
    }
  }
  .sp-content {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    .sp-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 20px 0;
      img {
        width: 80%;
      }
      p {
        min-width: 60%;
        line-height: 36px;
        font-size: 16px;
        border-bottom: 1px solid #666;
        text-align: center;
        margin-top: 10px;
      }
    }
  }
}
</style>